{% extends "agm1.0/base.html" %}
{%- block body %}
        <section id="memberjf" data-role="page" data-add-back-btn="true" data-dom-cache="false">
            <header data-role="header" data-position="fixed">
                {% if not session.get('wechatuserid') %}
                <a href="/agm/auth2?goto=memberjf" rel="external" data-role="button" data-icon="info" class="ui-btn-right">登录</a>{% endif %}            
                <h3>我的积分</h3>
            </header>
             <div class="head_pic"><img src="/static/images/tu1.jpg"></div>    
            <div data-role="content">
                {% if session.get('wechatuserid') %}                
                当前积分为: {{ g.wechatuser.get('jf')}}
                <table data-role="table" id="table-column-toggle-fwjf" class="ui-responsive table-stroke table-stripe" data-column-btn-text="选择列">
                    <thead>
                        <tr>
                            <th>积分</th>
                            <th data-priority="1">防伪码</th>
                            <th data-priority="5">时间</th>
                        </tr>
                    <thead>
                    <tbody>
                        {% for item in g.items %}<tr>
                            <td>+{{item.get('jf')}}</td>
                            <td>{{item.get('code')}}</td>
                            <td>{{(item.created_at+timedelta(hours=8)).strftime('%Y-%m-%d %H:%M')}}</td>
                        </tr>{% endfor %}
                    </tbody>
                </table>
                {% else %}
                请点击右上角登录按钮进行登录
                {% endif %}
            </div>        
            <footer data-role="footer" data-position="fixed"><h3><small>©2018 音速风暴</small></h3></footer>
        </section>           
    {% endblock %}